﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AIMLBot;

namespace SurvivalStrategy.Entities.ConversationData
{
    class Character
    {
        public string outcome;
        cBot bot;
        Chat chat;
        string hello;

        public Character(List<string> files, Chat chat)
        {
            bot = new cBot(false, files);
            this.chat = chat;
            hello = "Cześć";
        }

        public void Init()
        {
            if (chat.started == false)
            {
                StartChat(hello);
            }
        }

        private void StartChat(string startString)
        {
            chat.started = true;
            chat.talk(startString);
        }

        public string Reply(string question)
        {
            cResponse reply = bot.chat(question, "Default");
            outcome = reply.getOutput();
            return outcome;
        }
    }
}
